#pragma once

namespace mgfx
{
	class RenderingSystem;

	class GfxObject
	{
	public:
		XMFLOAT4X4 WorldTransform;
		XMFLOAT3 Position;
		XMFLOAT4 Orientation;
		XMFLOAT3 Scale;

		uint Id;

		enum ObjType
		{
			MESH_INSTANCE, POINT_LIGHT, SPOT_LIGHT, PARTICLE_SYSTEM
		} Type;

		void updateDrawData(XMFLOAT3 position, XMFLOAT4 orientation, XMFLOAT3 scale);

		// Even though class has virtual method, virtual destructor is not necessary,
		// since object that creates and destroys objects deriving from this class,
		// stores them by their exact type, not by pointer to GfxObject.
		virtual GfxObject* copy() const { assert("This should" == "never happen"); return NULL; };
		RenderingSystem * System;
	};

}